using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Configuration;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class BulletedListPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            LoadData();

        }
    }
    void LoadData()
    {
        string connectionString =
                WebConfigurationManager.ConnectionStrings[
                "RCVDB2000"].ConnectionString;

        ControlHelper cls = new
        ControlHelper(connectionString);
        cls.CommandText = 
        "select * from tblJobIndustries";
        cls.CommandType = CommandType.Text;
        cls.InitProperties();
        cls.FillDataTableToBulletedList(
        this.BulletedList1, "JobIndustryName", "JobIndustryID"); 
        this.BulletedList1.BulletStyle= 
        BulletStyle.Circle;     
         
        this.BulletedList1.DisplayMode= 
        BulletedListDisplayMode.LinkButton;
        cls.Finalize();
    }
    protected void BulletedList1_Click(object sender, BulletedListEventArgs e)
    {
        Literal1.Text = BulletedList1.Items[e.Index].Value
        +"-"+BulletedList1.Items[e.Index].Text;
    }
}
